<!DOCTYPE html>
<html>
	<head>
	    <title>订单信息</title>
	    <meta charset="UTF-8">
	    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	    <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.min.css" />
	    <link rel="stylesheet" type="text/css" href="css/style.css" />
	    <script type="text/javascript" src="js/jquery.min.js"></script>  
	</head>
	<body>
<?php
session_start();
error_reporting(5);

include_once('../dbtools.inc.php');
include_once('../config.php');
// include_once('back_order_list.php');
$goods=$_POST['gsn'];
	$field=$goods;
	       if($field!=""){
	       	$sql="SELECT * FROM order_tj WHERE goodsname like '%$field%' OR salerid like '%$field%' OR saler_name like '%$field%' OR saler_tel like '%$field%' OR saler_address like '%$field%' OR tj_name like '%$field%' OR tj_tel like '%$field%'OR tj_address like '%$field%'OR pub_time like '%$field%'OR u_name like '%$field%'OR email like '%$field%'OR tj_id like '%$field%'";
	       	$result = mysqli_query($config,$sql) or die ('SQL语句有误：'.mysqli_error());
	       }
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
	?>

		<form class="form-inline definewidth m20" action="back_order_search.php" method="post" name="form_search">
			订单信息：<input name="gsn" id="search" placeholder="查询订单" class="abc input-default" value=""></input>&nbsp;&nbsp;
			<button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp;
		</form>
		<table class="table table-bordered table-hover definewidth m10">
		    <thead>
			    <tr>
					<th>订单号</th>
			        <th>卖家id</th>
			        <th>卖家昵称</th>
			        <th>卖家电话</th>
			        <th>卖家地址</th>
			        <th>商品信息</th>
			        <th>商品图片</th>
			        <th>商品价格</th>
			        <th>买家名称</th>
			        <th>买家电话</th>
			        <th>买家地址</th>
			        <th>订单时间</th>
			        <th style="text-align:center;">操作</th>
			    </tr>
		    </thead>


            <?php while ($ro=mysqli_fetch_array($result)){?>

		
			<tr>
				<td><?php echo $ro['tj_id'];?></td>
				<td><?php echo $ro['salerid'];?></td>
				<td><?php echo $ro['saler_name'];?></td>
				<td><?php echo $ro['saler_tel'];?></td>
				<td><?php echo $ro['saler_address'];?></td>
				<td><?php echo $ro['goodsname'];?></td>
				<td style="width:80px;height: 80px;"><img src="../images/goods/<?php echo $ro['bigtypeid'];?>/<?php echo $ro['smalltypeid'];?>/<?php echo $ro['picture'];?>" style="width: 100%;height: 100%;"></td>
				<td><?php echo $ro['cost'];?></td>
				<td><?php echo $ro['tj_name'];?></td>
				<td><?php echo $ro['tj_tel'];?></td>
				<td><?php echo $ro['tj_address'];?></td>
				<td><?php echo $ro['pub_time'];?></td>
				<td style="text-align:center;">                
					<a href="back_order_delete.php?id=<?php echo $ro['tj_id']?>" onclick="return confirm('是否已完成该订单？');">完成</a>&nbsp;            
				</td>
			</tr>
			
			 <?php } ?>
		</table>
	</body>
</html>